Import('benchEnv')
Import('mcoreLibrary')
Import('mtmLibrary')
Import('pmallocLibrary')

memcachedEnv = benchEnv.Clone() 
memcachedEnv.Append(CCFLAGS = ' -D_GNU_SOURCE ')
memcachedEnv.Append(CPPPATH = ['#library/common'])
memcachedEnv.Append(CCFLAGS = ' -O2 -fno-omit-frame-pointer')
sconscript_path = 'memcached-1.2.4-mtm/SConscript'

# Build library for persistent variables
pvarLibrary = None
memcachedEnv['BUILD_PVAR'] = True
Export('memcachedEnv')
pvarLibrary = SConscript(sconscript_path)
Export('pvarLibrary')

# Build Memcached
memcachedEnv['BUILD_PVAR'] = False
Export('memcachedEnv')
SConscript(sconscript_path)
